 let obj = {
         name:"xiaoli",
         age:12,
         gender:undefined
     }
     let {name,age,gender='male'} = obj
     console.log(name,age,gender)

     //xiaoli 12 male
    
     age = 12
     console.log(age)

     //12
    
     let [a,b,c] = 'today'
     let {length:len} = 'today'
     console.log(len)

     //a='t' b='o' c='d'
     //len=5
    
     let {valueOf} = true
     console.log(valueOf)
     var name = "znn"
     var obj = {
         name,
         foo() {
             console.log("my name is "+name)
         },
     }
     obj.foo()


     //[function valueOf]
     //my name is znn 
    
     console.log(Object) // [Function Object]
     let arr = new Array(3);
     arr.fill({name:'larry'});
     console.log(arr);  //[ { name: 'larry' }, { name: 'larry' }, { name: 'larry' } ]
     arr[0].name = 'tom';
     console.log(arr);  //[ { name: 'tom' }, { name: 'tom' }, { name: 'tom' } ]
    
    
    let fun1 = function(){
        return 1;
    }
    let fun2 = () => 1;
    
    console.log(fun1());//1
    console.log(fun2());//1
    
    
    